from wikimodels import WikiArticle, WikiRevision

from django.db import models
from django.contrib.auth.models import User

class BlogPost(WikiArticle):
    #author - already exists, by WikiArticle
    title = models.CharField(max_length=255)
    #content - already exists, by WikiArticle
    published_date = models.DateTimeField('date published', auto_now_add=1)

    # add other fields, for example `slug`, etc.


    def __unicode__(self):
        return "%s (%s)" % (self.slug, unicode(self.id))

    class Admin:
        pass

class BlogPostRevision(WikiRevision):
    """
    WikiRevision is model without admin interface, if you need it add:

    class Admin:
        pass

    """

    article = models.ForeignKey(BlogPost, related_name='revision_set')
